const express = require("express")
const router = express.Router()
const jrdController = require("./controller")

// 获取用户信息
router.post("/v1/user/info", jrdController.getUserInfo)

// 获取优化目标分组
router.post("/v1/wechat_channels/group_list", jrdController.getGroupList)

// 获取登录小程序码
router.post("/v1/login/create_login_qrcode", jrdController.createLoginQrcode)

// 验证扫码状态（轮询接口）
router.post("/v1/login/check_scan", jrdController.checkScan)

// 退出登录
router.post("/v1/login/quit", jrdController.quit)

// 获取优化目标/其他配置
router.post("/v1/wechat_channels/goal_config", jrdController.getGoalConfig)

// 查询账号信息及授权状态
router.post("/v1/wechat_channels/search_account_auth", jrdController.searchAccountAuth)

// 查询账号信息-电商专用
router.post("/v1/wechat_channels/search_wxd_account", jrdController.searchWxdAccount)

// 自定义人群画像
router.post("/v1/wechat_channels/crowd_list", jrdController.getCrowdList)

// 自定义人群画像-电商专用
router.post("/v1/wechat_channels/crowd_wxd_list", jrdController.getCrowdWxdList)

// 获取加热视频(单选)
router.post("/v1/wechat_channels/get_video_list", jrdController.getVideoList)

// 获取加热视频(多选)-电商专用
router.post("/v1/wechat_channels/get_wxd_video_list", jrdController.getWxdVideoList)

module.exports = router
